<?php

require_once dirname(__FILE__).'/../lib/personal_quincenaGeneratorConfiguration.class.php';
require_once dirname(__FILE__).'/../lib/personal_quincenaGeneratorHelper.class.php';

/**
 * personal_quincena actions.
 *
 * @package    control_obras
 * @subpackage personal_quincena
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $
 */
class personal_quincenaActions extends autoPersonal_quincenaActions
{
  public function executeVerPersonalPorQuincena(sfWebRequest $request)
  {
    $filtros = $this->configuration->getFilterDefaults();

    $filtros['quincena_id'] = $request->getParameter('quincena_id');

    $this->getUser()->setAttribute('personal_quincena.filters', $filtros, 'admin_module');

    $this->redirect('@personal_quincena');
  }

  public function executeVerDiasTrabajados(sfWebRequest $request)
  {
    $request->setParameter('personal_quincena_id', $this->getRoute()->getObject()->getId());

    $this->forward('dia_trabajado', 'verDiaTrabajadoPorPersonalQuincena');
  }
}
